//
//  CourseStudentOfClassDetailCell.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/4/23.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "CourseStudentOfClassDetailCell.h"

@implementation CourseStudentOfClassDetailCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initSubView];
        [self layout];
    }
    return self;
}
- (void)initSubView{
    [self addSubview:self.baseView];
    _baseView.frame = CGRectMake(100, 0, self.frame.size.width-200, 40);
    CGFloat X = (self.frame.size.width - 200)/7;
    for (int i = 0; i<7; i++) {
        UILabel *label = [[UILabel alloc]init];
        label.text = @"测试";
        label.textAlignment = 1;
        label.font = [UIFont systemFontOfSize:13];
        label.textColor = TITLECOLOR;
        label.tag = 1+i;
        [_baseView addSubview:label];
        label.frame = CGRectMake(X*i, 10, X, 20);
    }
}
- (void)reloadViewLayout{
    CGFloat X = (self.frame.size.width - 200)/7;
    for (int i = 0; i<7; i++) {
        UILabel *label = (UILabel *)[_baseView viewWithTag:i+1];
        label.frame = CGRectMake(X*i, 10, X, 20);
        label.text = self.nameArray[i];
    }
}
- (void)layout{
    
}
- (UIView *)baseView{
    if (!_baseView) {
        UIView *view = [[UIView alloc]init];
        view.backgroundColor = [UIColor whiteColor];
        _baseView = view;
    }
    return _baseView;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
